<template>
  <div class="tabbar">
    <div :class="{name:true,active:TabbarText == index}" v-for="(item,index) in Tabbarlist" :key="index" @click="handleClick(index)">
      {{item}}
    </div>
  </div>
</template>

<script>
export default {
  data(){
    return {
      TabbarText:1,
      Tabbarlist:['首页','爆爆团','订单','我的']
    }
  },
  methods:{
    handleClick(index){
      this.TabbarText=index
    }
  }
}
</script>

<style scoped>
.tabbar{
  width: 100%;
  height: 50px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  font-size: 14px;
  color: gray;
  position: absolute;
  bottom: 0;
  cursor: pointer;
  background-color: white;
}
.active{
  color: rgb(0, 157, 255);
}
</style>